<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    li {
      width: 400px;
     
      margin: 10px;
      background-color: rgb(43, 155, 21);
    }
  </style>
</head>

<body>
  <div id="app">
    <div v-for="(floor,i) in floors" :key="i">
      <h5>
        {{floor.title}}
      </h5>
      <ul>
        <li v-for="(item, index) in floor.items" :key="index">
          <h5>商品名：{{item.name}} {{i+1}} 楼 </h5>
          <p>商品价格：{{item.price}}</p>
        </li>
      </ul>
    </div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data() {
        return {
          floors: [
            {
              title: '手机',
              items: [
                {
                  name: '商品1',
                  price: 10
                },
                {
                  name: '商品2',
                  price: 20
                },
                {
                  name: '商品1',
                  price: 30
                }
              ]
            },
            {
              title: '电脑',
              items: [
                {
                  name: '商品1',
                  price: 10
                },
                {
                  name: '商品2',
                  price: 20
                },
                {
                  name: '商品1',
                  price: 30
                }
              ]
            }
          ]
        }
      }
    })
    app.mount('#app')
  </script>
</body>

</html>